Revert "treeview: Remove unneeded checks"
authorMatthias Clasen <mclasen@redhat.com>
Sun, 1 Jun 2014 14:09:52 +0000 (10:09 -0400)
committerMatthias Clasen <mclasen@redhat.com>
Sun, 1 Jun 2014 14:17:59 +0000 (10:17 -0400)
This reverts commit a158a2aa48c8023f99963642cc2657bff207b82d.

The commit conflicts with a later revert, so move it out of the way.

gtk/gtktreeview.c

index 486253582f0ddb32539505a8fcbb97e9b5f960b5..868af44cf686e7580d9919b168befa4252a52013 100644 (file)
@@ -2591,8 +2591,10 @@ gtk_tree_view_get_preferred_width (GtkWidget *widget,
        tree_view->priv->n_expand_columns++;
     }
 
-  *minimum = tree_view->priv->minimum_width;
-  *natural = tree_view->priv->natural_width;
+  if (minimum != NULL)
+    *minimum = tree_view->priv->minimum_width;
+  if (natural != NULL)
+    *natural = tree_view->priv->natural_width;
 }
 
 static void
@@ -2607,8 +2609,10 @@ gtk_tree_view_get_preferred_height (GtkWidget *widget,
 
   height = gtk_tree_view_get_height (tree_view) + gtk_tree_view_get_effective_header_height (tree_view);
 
-  *minimum = height;
-  *natural = height;
+  if (minimum != NULL)
+    *minimum = height;
+  if (natural != NULL)
+    *natural = height;
 }
 
 static void